

**********************************************************************************************************
***************** Figure 6: Prevalence of Prohibitions on Unilateral Conduct             *****************
**********************************************************************************************************


// Panel 1
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0

egen EFF = mean(dominance_discounts), by(year)
tab EFF year

egen tag = tag(year)
twoway line EFF year if tag, sort saving(discounts) title("Loyalty Discounts",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)

// Panel 2
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0


egen EFF = mean(dominance_unfair_pricing), by(year)
tab EFF year

egen tag = tag(year)
twoway line EFF year if tag, sort saving(unfairpricing) title("Unfair Pricing",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)

// Panel 3
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0


egen EFF = mean(dominance_discrim_pricing), by(year)
tab EFF year

egen tag = tag(year)
twoway line EFF year if tag, sort saving(discrim) title("Discriminatory Pricing",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)


// Panel 4 
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0


egen EFF = mean(dominance_price_maintenance), by(year)
tab EFF year

egen tag = tag(year)
twoway line EFF year if tag, sort saving(rpm) title("Retail Price Maintence",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)

// Panel 5
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0


egen EFF = mean(dominance_efficiency_def), by(year)
tab EFF year

egen tag = tag(year)
twoway line EFF year if tag, sort saving(efficiency) title("Efficiency Defense",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)

// Panel 6
use CCL_Law_Data_Ver1.dta,clear

keep if year >1949
keep if year <2011
drop if regional_group==1
drop if competition_law_coded_ever==0
drop if competition_law_in_place==0

egen EFF = mean(dominance_pubint_def), by(year)
tab EFF year


egen tag = tag(year)
twoway line EFF year if tag, sort saving(pubint) title("Public Interest Defense",color(black)) graphregion(color(white)) bgcolor(white) xtitle("Year") ytitle("Proportion")  lpattern(1 _ shortdash_dot longdash) xla(1950(10)2010) yla(0(.2)1.05)


// Combine 
gr combine discounts.gph unfairpricing.gph discrim.gph rpm.gph efficiency.gph pubint.gph,col(2)

